
void _Search_By_Isbn(map<string,Book>&Books,const string isbn){
	
}
void _Add_New_book(map<string,Book>&Books){
	
}
void _Delete_By_Isbn(map<string,Book>&Books,const string isbn){
	map<string,Book>::iterator it;
	it = Books.find(isbn);
	if(it!=Books.end()){
		cout<<"删除书籍成功，该书籍的详细信息如下："<<endl;
		it->second.show();
		Books.erase(it);
	}
	else{
		cout<<"书籍不存在，删除失败"<<endl;
	}
}
void _Exit(map<string,Book>&Books,const string& file_name){
	fstream out(file_name,ios::out | ios::trunc);
	for(auto& w:Books){
		out<<w.second.isbn<<" "<<w.second.units_sold<<" "<<w.second.se
	}
}
void _Display(){
	cout<<"\
	      **************************************\n\
		  *       1   -   search by isbn       *\n\
		  *       2   -   add new Book         *\n\
		  *       3   -   delete by isbn       *\n\
		  *       q   -   exit                 *\n\
		  **************************************"<<endl;
}
int main(){
	map<string,Book>Books;
	_Init(Books,"book_sales.txt");
	cout<<"\
	       >>>>>>程序加载完成<<<<<<"<<endl;
    _Display();
	string cmd;
	string isbn; 
	while(true){
		cout<<"请输入指令："<<endl;
		cin>>cmd;
		if(cmd=="1"){
			cout<<"请输入书籍的ISBN："<<endl;
			cin>>isbn;
			_Search_By_Isbn(Books,isbn);
		}
		else if(cmd=="2"){
			_Add_New_Isbn(Books,isbn);
		}
		else if(cmd=="3"){
			cout<<"请输入书籍的ISBN："<<endl;
			cin>>isbn;
			_Delete_By_Isbn(Books,Isbn);
		}
		else if(cmd=="q"){
			_Exit(Books, "book_sales,txt");
			return -1;
		}
	}
}